UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NFP3tq0IIb4QX1Kqt/T+GReC8UmK83U0ecLfbGzXNKs='
WHERE
key_id = '6b0d4f6d41e840bb73483b1cfeb4d9a7d2a6fdccd1201b714aa36182ec557a87'
AND (
token = 'NFP3tq0IIb4QX1Kqt/T+GReC8UmK83U0ecLfbGzXNKs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)