UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+oVO5uI8/kjoMN3yUcL4qoNcTFxfcDJPHhsmyj4gM2E='
WHERE
key_id = 'eb9542b990db73faad46da8463cf41696a1a6884857ac1dbca58984a4fd2dc51'
AND (
token = '+oVO5uI8/kjoMN3yUcL4qoNcTFxfcDJPHhsmyj4gM2E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)