UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uBzbe6G6K11LfnfDdOoi/OPK1nEqLQ3RwnhbIByyBxU='
WHERE
key_id = '5e236ada9697004e803e0180ec23eb9612d88b4f3584ff151cea2fd3deb87db7'
AND (
token = 'uBzbe6G6K11LfnfDdOoi/OPK1nEqLQ3RwnhbIByyBxU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)