UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DOryg7pzmfr2TECD+AODPUfAhrn3RfKLLxj25fgsbQo='
WHERE
key_id = '1a489bcd303a138ca65c14f03e67fe87280416a5342b9901cf0dc1a651c3a024'
AND (
token = 'DOryg7pzmfr2TECD+AODPUfAhrn3RfKLLxj25fgsbQo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)