UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5Bzzr4jtNFWYR1ooW2wW4W+/T56l9pH9OZMVQJgPJMY='
WHERE
key_id = '914c82f7b9e46e9503beff682bd07e21c39a15ba695b38eff04b771f1c4e4899'
AND (
token = '5Bzzr4jtNFWYR1ooW2wW4W+/T56l9pH9OZMVQJgPJMY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)