UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/irP/KNqknDjVdrdMA3GeqL8dWY6ecLe0n64oEio2tE='
WHERE
key_id = '75184cf2988173b068f997be2152a5c03b7f9d22b06476493a00d9fbfe92e2ed'
AND (
token = '/irP/KNqknDjVdrdMA3GeqL8dWY6ecLe0n64oEio2tE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)