UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0u2d/G6gnOpLeC/oxwvDOuktP9hy6dDN+KZAQLYZLmw=' 
WHERE 
  key_id = '018a3cea8aac8d3b8aec46993d3fab25081db9615fa4281fe88b1ed8d4c3fa00' 
  AND (
    token = '0u2d/G6gnOpLeC/oxwvDOuktP9hy6dDN+KZAQLYZLmw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033