UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '01DCeaw70a3gnjzRXTXqJwlgpN5hJmjIN9bWGwe3SqE=' 
WHERE 
  key_id = '549af8dbde22c77643d5bcad0beb7f60b975486836c5d6433cfa7596ab70ee52' 
  AND (
    token = '01DCeaw70a3gnjzRXTXqJwlgpN5hJmjIN9bWGwe3SqE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033