UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u4dyMyUNqqHCFAaRWMsKXkPVrwOtkLPx8DRVDHfl/38='
WHERE
key_id = '92083dc3f106ed5e99cdc7de383fa1a51d21dbd713394d5a1425faaaa33954d4'
AND (
token = 'u4dyMyUNqqHCFAaRWMsKXkPVrwOtkLPx8DRVDHfl/38='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)