UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dltOC2BTDrP84UJWs4yiK9nnRrj/GtfwXHhnUDNlLVs='
WHERE
key_id = 'e69b3c9b190974f92136cb08031a220bbb21e16621cb232a0102b9ca3b59d1f5'
AND (
token = 'dltOC2BTDrP84UJWs4yiK9nnRrj/GtfwXHhnUDNlLVs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)