UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+ghVXke9UATbaC+N1bGtH5HwE1DFnJ1TcCposlfy724='
WHERE
key_id = '02eb1c65bcc01d26cb31479b776ddefffa54c67e47dab439805f759f52d72920'
AND (
token = '+ghVXke9UATbaC+N1bGtH5HwE1DFnJ1TcCposlfy724='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)