UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sONGfg3P5+eqKcEXIrp/x4zXbcrAkKZUIl3QtJe8QiA='
WHERE
key_id = '092067fdcc549693a5d014667e7d163ecaec1aaff426c3266a7e08297a6be8b0'
AND (
token = 'sONGfg3P5+eqKcEXIrp/x4zXbcrAkKZUIl3QtJe8QiA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)