UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0UuQ8r64DmqbhY+/pEnlGRck/CqXcJcntKZrByWcErU='
WHERE
key_id = '424e2a42ee62298acf83bdb51b9434d7c6ce47db89ba2276e6b1af86c1ef73ba'
AND (
token = '0UuQ8r64DmqbhY+/pEnlGRck/CqXcJcntKZrByWcErU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)