UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rCLyqriirJvcqXvNrYL9kb3f++XtrgBsqi2OBRYsiL0=' 
WHERE 
  key_id = '9c6c0843a621c060cdf0cbface42e3b84854d07d7e44e1a1ea7a5cb030dcf51d' 
  AND (
    token = 'rCLyqriirJvcqXvNrYL9kb3f++XtrgBsqi2OBRYsiL0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021