UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+NhL3y951QLGpdtZaZaLk0HnErbcrsSZrA9oge21Y2g='
WHERE
key_id = '326dedc9aedb2ec59c7e3a9c20b61cd6f2977fb8248a41f9b876e0555463fb29'
AND (
token = '+NhL3y951QLGpdtZaZaLk0HnErbcrsSZrA9oge21Y2g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)