UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GVCu1JxwhuLTkx4edx+AK8I2AKDzSyr+sZMJIdKpCGk='
WHERE
key_id = '2a9bab1f6f6e0687c4adc8aaaf3f8486f60cfe381440eeb5f21076a874a44115'
AND (
token = 'GVCu1JxwhuLTkx4edx+AK8I2AKDzSyr+sZMJIdKpCGk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)