UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ShWQZ8mSq93LgIovGObo+X0Spjo0qjBWRNminZ564Qg='
WHERE
key_id = '266e1b02c0de75f1bc3214bb4760121066f5398fb82629cb79a59cf7ff6d20c1'
AND (
token = 'ShWQZ8mSq93LgIovGObo+X0Spjo0qjBWRNminZ564Qg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)