UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5En5JCW/iMzMCqk+TxMVYLqxh6f+u9ETFqKPq1X9PaQ=' 
WHERE 
  key_id = 'eb3396720eba0142c91b6cdfe5cbe8afeac6bf7b0bbf83089ccb35e76fa6a71f' 
  AND (
    token = '5En5JCW/iMzMCqk+TxMVYLqxh6f+u9ETFqKPq1X9PaQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031