UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pIys5gmKJ9y7SqTFK7Enmhr7IHfDTv7oAn/TjNwYVbM=' 
WHERE 
  key_id = '8f1ff5955cbde13320e5bbd36c7b591dc8b1e91e7da1e90bc2503358b46ea79c' 
  AND (
    token = 'pIys5gmKJ9y7SqTFK7Enmhr7IHfDTv7oAn/TjNwYVbM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032