UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eM7xfI2BzntNOmaufiyYWiyBLp0nNW5iNnUKSrsohOE='
WHERE
key_id = '230b95ba2d5c18e61c5f4f09d5c1405477ee347c48987dae715caeb882c69dcb'
AND (
token = 'eM7xfI2BzntNOmaufiyYWiyBLp0nNW5iNnUKSrsohOE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)