UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hp0wbtcUEMnfldStaWo5Yna43/n4WHk43BzSNTgSYhU='
WHERE
key_id = 'f42e02b494f7bf126551756d04bf74f85c1a0f9d4f460690c58dfbe207ba2415'
AND (
token = 'hp0wbtcUEMnfldStaWo5Yna43/n4WHk43BzSNTgSYhU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)