UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '92eYS8bHlZPxLriLn+/riD/rP+TS+oi9XinCdYlcIQc='
WHERE
key_id = '54061b6057411856e862143efd9fd32bcaf076789e382d64ac8846f840b274fd'
AND (
token = '92eYS8bHlZPxLriLn+/riD/rP+TS+oi9XinCdYlcIQc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)