UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lQOM1jUKrDQVnvKNPbzoeqUAO2v1vh/4RQlIWgrigJc='
WHERE
key_id = '7675c904ed961923f43bdbabad7e28d4a24381d98c9d45c1e610679bd6a47e00'
AND (
token = 'lQOM1jUKrDQVnvKNPbzoeqUAO2v1vh/4RQlIWgrigJc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)