UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oObl/ESei6LXhM6ln8qgki+2yQZkKiLzSk9tbkWIwzw='
WHERE
key_id = '828258da28c7466feef6234cf2954aa890dc621fe0351150f54c322718a757f9'
AND (
token = 'oObl/ESei6LXhM6ln8qgki+2yQZkKiLzSk9tbkWIwzw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)