UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oaBRQseFwO7kURjmKmXhqYPdxSptL5xZX/886KHkUTw='
WHERE
key_id = '89f5e585262f98f19f0c99e5b159239ee810578e89b5604ae3cbaf5a9174b943'
AND (
token = 'oaBRQseFwO7kURjmKmXhqYPdxSptL5xZX/886KHkUTw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)