UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UXEcROh3Ldkus5yKJNDhPkYETWuulk/UlSRokUqhdiI='
WHERE
key_id = '5eb698761315b399cabc2765d406b049509aa5e7fb73cd181fe08285ee500b2b'
AND (
token = 'UXEcROh3Ldkus5yKJNDhPkYETWuulk/UlSRokUqhdiI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)