UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6Jr/jnBUE05kHtp4Ei3c7X47Y/CYLztFVMmp/TuKxJI='
WHERE
key_id = '2650efd3755d6a780913a42bf62c9572010b9dff4ffbb1822e0b14a1db9c9266'
AND (
token = '6Jr/jnBUE05kHtp4Ei3c7X47Y/CYLztFVMmp/TuKxJI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)