UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OEZeOUbpI8EdyypsFrV8gYrm6gY/x2YIlhxL3QZ597I='
WHERE
key_id = '60c542984fb5604af2ddee9fdb5f2f08b423286b02cc8e4947c2606a3e41d6c6'
AND (
token = 'OEZeOUbpI8EdyypsFrV8gYrm6gY/x2YIlhxL3QZ597I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)